package nccloud.hrkq.leave.ext.action;

import nc.itf.hrkq.leave.ext.IHrkqExtServer;
import nccloud.framework.service.ServiceLocator;
import nccloud.framework.web.action.itf.ICommonAction;
import nccloud.framework.web.container.IRequest;
import nccloud.framework.web.container.SessionContext;

public class ImportAction implements ICommonAction {

	@Override
	public Object doAction(IRequest request) {
		
		String content = request.read();
		int total = Integer.parseInt(content);
		String sessionid = SessionContext.getInstance().getSessionid();
		IHrkqExtServer server = ServiceLocator.find(IHrkqExtServer.class);
		String result = null;
		try {
			result = server.importLeaveExl(sessionid, total);
		} catch (Exception e) {
			e.printStackTrace();
		}
	    
		return result;
	}

}
